package com.eshop.exception;

import org.springframework.http.HttpStatus;

public class ErrorRequestException extends RuntimeException
{
    private Integer status;
    
    public ErrorRequestException(final String msg) {
        super(msg);
        this.status = HttpStatus.BAD_REQUEST.value();
    }
    
    public ErrorRequestException(final HttpStatus status, final String msg) {
        super(msg);
        this.status = HttpStatus.BAD_REQUEST.value();
        this.status = status.value();
    }
    
    public Integer getStatus() {
        return this.status;
    }
}
